# -*- coding: utf-8 -*-
# 模块：状态栏
import tkinter
import datetime


def statusbar_file_information(FP_parent_layer) -> None:
    file_info = "Filename.txt  32 KB"
    statusbar_info = tkinter.Label(FP_parent_layer, text=file_info, bg="#E4E4E4", width=100, height=1, anchor="sw")
    statusbar_info.pack()
    return None


def statusbar_work_status(FP_parent_layer) -> None:
    # while(True):
    datetime = current_datetime()
    working_status = "Loading...  " + datetime
    statusbar_work = tkinter.Label(FP_parent_layer, text=working_status, bg="#E4E4E4", width=100, height=1,anchor="se")
    statusbar_work.pack()
    return None


def current_datetime() -> str:
    """【函数】获取当前日期与时间（问题：不能实时更新）
    """
    INS_datetime = datetime.datetime.now()
    str_datetime = INS_datetime.strftime("%Y.%m.%d %H:%M:%S")
    # INS_datetime.year      # 获取年
    # INS_datetime.month     # 获取月
    # INS_datetime.day       # 获取日
    # INS_datetime.hour      # 获取时
    # INS_datetime.minute    # 获取分
    # INS_datetime.second    # 获取秒
    # INS_datetime.date()    # 获取日期
    return str_datetime
